#pragma once
#include "mythAvlist.hh"
class mythVirtualDecoder :
	public mythAvlist
{
public:
	static mythVirtualDecoder* CreateNew(void);
	void start(bool usethread = true);
	virtual void stop();
	void StopThread();
	virtual int MainLoop();

	static int MainLoopStatic(void* data){
		if(data){
			mythVirtualDecoder* decoder = (mythVirtualDecoder*)data;
			return decoder->MainLoop();
		}
		return 0;
	}

	virtual ~mythVirtualDecoder(void);
	unsigned int GetTimeCount();
protected:
	mythVirtualDecoder(void);
	int flag;
	unsigned int m_count;
	unsigned int ori_count;
	unsigned int ret_count;
	SDL_Thread* m_thread;
};

